package com.zoio.saike.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import javacommon.base.*;
import cn.org.rapid_framework.util.*;

/**
 * @author Bryan.Zhang@ZOIO.NET
 * @date 1/2/2011
 */

public class AmFile extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "AmFile";
	public static final String ALIAS_FILE_ID = "fileId";
	public static final String ALIAS_FILE_DATE = "fileDate";
	public static final String ALIAS_CREATOR_ID = "creatorId";
	public static final String ALIAS_MI_JI_NO = "miJiNo";
	public static final String ALIAS_PERSON_NAME = "personName";
	public static final String ALIAS_BOX_NO = "boxNo";
	public static final String ALIAS_STYPE = "stype";
	public static final String ALIAS_PAGES_AMOUNT = "pagesAmount";
	public static final String ALIAS_URGENCY = "urgency";
	public static final String ALIAS_IS_LOCKED = "isLocked";
	public static final String ALIAS_TEXT_ENTRY = "textEntry";
	public static final String ALIAS_CREATE_TIME = "createTime";
	public static final String ALIAS_BAO_GUAN_QI = "baoGuanQi";
	public static final String ALIAS_VECTOR_FORM = "vectorForm";
	public static final String ALIAS_QUAN_ZONG_NO = "quanZongNo";
	public static final String ALIAS_JIAN_NO = "jianNo";
	public static final String ALIAS_ZE_REN_ZHE = "zeRenZhe";
	public static final String ALIAS_FEN_LEI_NO = "fenLeiNo";
	public static final String ALIAS_INPUT_PERSON = "inputPerson";
	public static final String ALIAS_ELECTRONIC_DOC = "electronicDoc";
	public static final String ALIAS_JI_NO = "jiNo";
	public static final String ALIAS_MODIFY_ID = "modifyId";
	public static final String ALIAS_FILE_TYPE_ID = "fileTypeId";
	public static final String ALIAS_MI_JI_SELECT = "miJiSelect";
	public static final String ALIAS_ORG_ID = "orgId";
	public static final String ALIAS_FILE_NAME = "fileName";
	public static final String ALIAS_DESCRIPTION = "description";
	public static final String ALIAS_FEN_AMOUNT = "fenAmount";
	public static final String ALIAS_ATTACHMENT = "attachment";
	public static final String ALIAS_COMPANY_ID = "companyId";
	public static final String ALIAS_INPUT_DATE = "inputDate";
	public static final String ALIAS_MODIFY_TIME = "modifyTime";
	public static final String ALIAS_ARCHIVE_YEAR = "archiveYear";
	public static final String ALIAS_SORDER = "sorder";
	public static final String ALIAS_IS_VALID = "isValid";
	public static final String ALIAS_FILE_TYPE = "fileType";
	public static final String ALIAS_PROC_INST_ID = "procInstId";
	public static final String ALIAS_NUMBER_NO = "numberNo";
	public static final String ALIAS_KEYWORD = "keyword";
	public static final String ALIAS_PROCESS_DEF_ID = "processDefId";
	public static final String ALIAS_FORM_PATH = "formPath";
	
	//date formats
	public static final String FORMAT_FILE_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;
	public static final String FORMAT_INPUT_DATE = DATE_FORMAT;
	public static final String FORMAT_MODIFY_TIME = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * fileId       db_column: fileId 
     */	
	@Length(max=20)
	private java.lang.String fileId;
    /**
     * fileDate       db_column: fileDate 
     */	
	
	private java.util.Date fileDate;
    /**
     * creatorId       db_column: creatorId 
     */	
	@Length(max=20)
	private java.lang.String creatorId;
    /**
     * miJiNo       db_column: miJiNo 
     */	
	@Length(max=50)
	private java.lang.String miJiNo;
    /**
     * personName       db_column: personName 
     */	
	@Length(max=20)
	private java.lang.String personName;
    /**
     * boxNo       db_column: boxNo 
     */	
	@Length(max=20)
	private java.lang.String boxNo;
    /**
     * stype       db_column: stype 
     */	
	@Length(max=50)
	private java.lang.String stype;
    /**
     * pagesAmount       db_column: pagesAmount 
     */	
	
	private java.lang.Integer pagesAmount;
    /**
     * urgency       db_column: urgency 
     */	
	@Length(max=20)
	private java.lang.String urgency;
    /**
     * isLocked       db_column: isLocked 
     */	
	
	private java.lang.Integer isLocked;
    /**
     * textEntry       db_column: textEntry 
     */	
	@Length(max=20)
	private java.lang.String textEntry;
    /**
     * createTime       db_column: createTime 
     */	
	
	private java.util.Date createTime;
    /**
     * baoGuanQi       db_column: baoGuanQi 
     */	
	@Length(max=50)
	private java.lang.String baoGuanQi;
    /**
     * vectorForm       db_column: vectorForm 
     */	
	@Length(max=20)
	private java.lang.String vectorForm;
    /**
     * quanZongNo       db_column: quanZongNo 
     */	
	@Length(max=20)
	private java.lang.String quanZongNo;
    /**
     * jianNo       db_column: jianNo 
     */	
	@Length(max=50)
	private java.lang.String jianNo;
    /**
     * zeRenZhe       db_column: zeRenZhe 
     */	
	@Length(max=20)
	private java.lang.String zeRenZhe;
    /**
     * fenLeiNo       db_column: fenLeiNo 
     */	
	@Length(max=20)
	private java.lang.String fenLeiNo;
    /**
     * inputPerson       db_column: inputPerson 
     */	
	@Length(max=20)
	private java.lang.String inputPerson;
    /**
     * electronicDoc       db_column: electronicDoc 
     */	
	@Length(max=254)
	private java.lang.String electronicDoc;
    /**
     * jiNo       db_column: jiNo 
     */	
	@Length(max=20)
	private java.lang.String jiNo;
    /**
     * modifyId       db_column: modifyId 
     */	
	@Length(max=20)
	private java.lang.String modifyId;
    /**
     * fileTypeId       db_column: fileTypeId 
     */	
	@Length(max=20)
	private java.lang.String fileTypeId;
    /**
     * miJiSelect       db_column: miJiSelect 
     */	
	@Length(max=50)
	private java.lang.String miJiSelect;
    /**
     * orgId       db_column: orgId 
     */	
	@Length(max=20)
	private java.lang.String orgId;
    /**
     * fileName       db_column: fileName 
     */	
	@Length(max=2000)
	private java.lang.String fileName;
    /**
     * description       db_column: description 
     */	
	@Length(max=2147483647)
	private java.lang.String description;
    /**
     * fenAmount       db_column: fenAmount 
     */	
	
	private java.lang.Integer fenAmount;
    /**
     * attachment       db_column: attachment 
     */	
	@Length(max=2000)
	private java.lang.String attachment;
    /**
     * companyId       db_column: companyId 
     */	
	@NotBlank @Length(max=20)
	private java.lang.String companyId;
    /**
     * inputDate       db_column: inputDate 
     */	
	
	private java.util.Date inputDate;
    /**
     * modifyTime       db_column: modifyTime 
     */	
	
	private java.util.Date modifyTime;
    /**
     * archiveYear       db_column: archiveYear 
     */	
	@Length(max=20)
	private java.lang.String archiveYear;
    /**
     * sorder       db_column: sorder 
     */	
	
	private java.lang.Double sorder;
    /**
     * isValid       db_column: isValid 
     */	
	
	private java.lang.Integer isValid;
    /**
     * fileType       db_column: fileType 
     */	
	
	private java.lang.Integer fileType;
    /**
     * procInstId       db_column: procInstId 
     */	
	@Length(max=20)
	private java.lang.String procInstId;
    /**
     * numberNo       db_column: numberNo 
     */	
	@Length(max=100)
	private java.lang.String numberNo;
    /**
     * keyword       db_column: keyword 
     */	
	@Length(max=100)
	private java.lang.String keyword;
    /**
     * processDefId       db_column: processDefId 
     */	
	@Length(max=20)
	private java.lang.String processDefId;
    /**
     * formPath       db_column: formPath 
     */	
	@Length(max=2000)
	private java.lang.String formPath;
	//columns END

	public AmFile(){
	}

	public AmFile(
		java.lang.String fileId
	){
		this.fileId = fileId;
	}

	public void setFileId(java.lang.String value) {
		this.fileId = value;
	}
	
	public java.lang.String getFileId() {
		return this.fileId;
	}
	public String getFileDateString() {
		return DateConvertUtils.format(getFileDate(), FORMAT_FILE_DATE);
	}
	public void setFileDateString(String value) {
		setFileDate(DateConvertUtils.parse(value, FORMAT_FILE_DATE,java.util.Date.class));
	}
	
	public void setFileDate(java.util.Date value) {
		this.fileDate = value;
	}
	
	public java.util.Date getFileDate() {
		return this.fileDate;
	}
	public void setCreatorId(java.lang.String value) {
		this.creatorId = value;
	}
	
	public java.lang.String getCreatorId() {
		return this.creatorId;
	}
	public void setMiJiNo(java.lang.String value) {
		this.miJiNo = value;
	}
	
	public java.lang.String getMiJiNo() {
		return this.miJiNo;
	}
	public void setPersonName(java.lang.String value) {
		this.personName = value;
	}
	
	public java.lang.String getPersonName() {
		return this.personName;
	}
	public void setBoxNo(java.lang.String value) {
		this.boxNo = value;
	}
	
	public java.lang.String getBoxNo() {
		return this.boxNo;
	}
	public void setStype(java.lang.String value) {
		this.stype = value;
	}
	
	public java.lang.String getStype() {
		return this.stype;
	}
	public void setPagesAmount(java.lang.Integer value) {
		this.pagesAmount = value;
	}
	
	public java.lang.Integer getPagesAmount() {
		return this.pagesAmount;
	}
	public void setUrgency(java.lang.String value) {
		this.urgency = value;
	}
	
	public java.lang.String getUrgency() {
		return this.urgency;
	}
	public void setIsLocked(java.lang.Integer value) {
		this.isLocked = value;
	}
	
	public java.lang.Integer getIsLocked() {
		return this.isLocked;
	}
	public void setTextEntry(java.lang.String value) {
		this.textEntry = value;
	}
	
	public java.lang.String getTextEntry() {
		return this.textEntry;
	}
	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}
	public void setCreateTimeString(String value) {
		setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,java.util.Date.class));
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	public void setBaoGuanQi(java.lang.String value) {
		this.baoGuanQi = value;
	}
	
	public java.lang.String getBaoGuanQi() {
		return this.baoGuanQi;
	}
	public void setVectorForm(java.lang.String value) {
		this.vectorForm = value;
	}
	
	public java.lang.String getVectorForm() {
		return this.vectorForm;
	}
	public void setQuanZongNo(java.lang.String value) {
		this.quanZongNo = value;
	}
	
	public java.lang.String getQuanZongNo() {
		return this.quanZongNo;
	}
	public void setJianNo(java.lang.String value) {
		this.jianNo = value;
	}
	
	public java.lang.String getJianNo() {
		return this.jianNo;
	}
	public void setZeRenZhe(java.lang.String value) {
		this.zeRenZhe = value;
	}
	
	public java.lang.String getZeRenZhe() {
		return this.zeRenZhe;
	}
	public void setFenLeiNo(java.lang.String value) {
		this.fenLeiNo = value;
	}
	
	public java.lang.String getFenLeiNo() {
		return this.fenLeiNo;
	}
	public void setInputPerson(java.lang.String value) {
		this.inputPerson = value;
	}
	
	public java.lang.String getInputPerson() {
		return this.inputPerson;
	}
	public void setElectronicDoc(java.lang.String value) {
		this.electronicDoc = value;
	}
	
	public java.lang.String getElectronicDoc() {
		return this.electronicDoc;
	}
	public void setJiNo(java.lang.String value) {
		this.jiNo = value;
	}
	
	public java.lang.String getJiNo() {
		return this.jiNo;
	}
	public void setModifyId(java.lang.String value) {
		this.modifyId = value;
	}
	
	public java.lang.String getModifyId() {
		return this.modifyId;
	}
	public void setFileTypeId(java.lang.String value) {
		this.fileTypeId = value;
	}
	
	public java.lang.String getFileTypeId() {
		return this.fileTypeId;
	}
	public void setMiJiSelect(java.lang.String value) {
		this.miJiSelect = value;
	}
	
	public java.lang.String getMiJiSelect() {
		return this.miJiSelect;
	}
	public void setOrgId(java.lang.String value) {
		this.orgId = value;
	}
	
	public java.lang.String getOrgId() {
		return this.orgId;
	}
	public void setFileName(java.lang.String value) {
		this.fileName = value;
	}
	
	public java.lang.String getFileName() {
		return this.fileName;
	}
	public void setDescription(java.lang.String value) {
		this.description = value;
	}
	
	public java.lang.String getDescription() {
		return this.description;
	}
	public void setFenAmount(java.lang.Integer value) {
		this.fenAmount = value;
	}
	
	public java.lang.Integer getFenAmount() {
		return this.fenAmount;
	}
	public void setAttachment(java.lang.String value) {
		this.attachment = value;
	}
	
	public java.lang.String getAttachment() {
		return this.attachment;
	}
	public void setCompanyId(java.lang.String value) {
		this.companyId = value;
	}
	
	public java.lang.String getCompanyId() {
		return this.companyId;
	}
	public String getInputDateString() {
		return DateConvertUtils.format(getInputDate(), FORMAT_INPUT_DATE);
	}
	public void setInputDateString(String value) {
		setInputDate(DateConvertUtils.parse(value, FORMAT_INPUT_DATE,java.util.Date.class));
	}
	
	public void setInputDate(java.util.Date value) {
		this.inputDate = value;
	}
	
	public java.util.Date getInputDate() {
		return this.inputDate;
	}
	public String getModifyTimeString() {
		return DateConvertUtils.format(getModifyTime(), FORMAT_MODIFY_TIME);
	}
	public void setModifyTimeString(String value) {
		setModifyTime(DateConvertUtils.parse(value, FORMAT_MODIFY_TIME,java.util.Date.class));
	}
	
	public void setModifyTime(java.util.Date value) {
		this.modifyTime = value;
	}
	
	public java.util.Date getModifyTime() {
		return this.modifyTime;
	}
	public void setArchiveYear(java.lang.String value) {
		this.archiveYear = value;
	}
	
	public java.lang.String getArchiveYear() {
		return this.archiveYear;
	}
	public void setSorder(java.lang.Double value) {
		this.sorder = value;
	}
	
	public java.lang.Double getSorder() {
		return this.sorder;
	}
	public void setIsValid(java.lang.Integer value) {
		this.isValid = value;
	}
	
	public java.lang.Integer getIsValid() {
		return this.isValid;
	}
	public void setFileType(java.lang.Integer value) {
		this.fileType = value;
	}
	
	public java.lang.Integer getFileType() {
		return this.fileType;
	}
	public void setProcInstId(java.lang.String value) {
		this.procInstId = value;
	}
	
	public java.lang.String getProcInstId() {
		return this.procInstId;
	}
	public void setNumberNo(java.lang.String value) {
		this.numberNo = value;
	}
	
	public java.lang.String getNumberNo() {
		return this.numberNo;
	}
	public void setKeyword(java.lang.String value) {
		this.keyword = value;
	}
	
	public java.lang.String getKeyword() {
		return this.keyword;
	}
	public void setProcessDefId(java.lang.String value) {
		this.processDefId = value;
	}
	
	public java.lang.String getProcessDefId() {
		return this.processDefId;
	}
	public void setFormPath(java.lang.String value) {
		this.formPath = value;
	}
	
	public java.lang.String getFormPath() {
		return this.formPath;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("FileId",getFileId())
			.append("FileDate",getFileDate())
			.append("CreatorId",getCreatorId())
			.append("MiJiNo",getMiJiNo())
			.append("PersonName",getPersonName())
			.append("BoxNo",getBoxNo())
			.append("Stype",getStype())
			.append("PagesAmount",getPagesAmount())
			.append("Urgency",getUrgency())
			.append("IsLocked",getIsLocked())
			.append("TextEntry",getTextEntry())
			.append("CreateTime",getCreateTime())
			.append("BaoGuanQi",getBaoGuanQi())
			.append("VectorForm",getVectorForm())
			.append("QuanZongNo",getQuanZongNo())
			.append("JianNo",getJianNo())
			.append("ZeRenZhe",getZeRenZhe())
			.append("FenLeiNo",getFenLeiNo())
			.append("InputPerson",getInputPerson())
			.append("ElectronicDoc",getElectronicDoc())
			.append("JiNo",getJiNo())
			.append("ModifyId",getModifyId())
			.append("FileTypeId",getFileTypeId())
			.append("MiJiSelect",getMiJiSelect())
			.append("OrgId",getOrgId())
			.append("FileName",getFileName())
			.append("Description",getDescription())
			.append("FenAmount",getFenAmount())
			.append("Attachment",getAttachment())
			.append("CompanyId",getCompanyId())
			.append("InputDate",getInputDate())
			.append("ModifyTime",getModifyTime())
			.append("ArchiveYear",getArchiveYear())
			.append("Sorder",getSorder())
			.append("IsValid",getIsValid())
			.append("FileType",getFileType())
			.append("ProcInstId",getProcInstId())
			.append("NumberNo",getNumberNo())
			.append("Keyword",getKeyword())
			.append("ProcessDefId",getProcessDefId())
			.append("FormPath",getFormPath())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFileId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof AmFile == false) return false;
		if(this == obj) return true;
		AmFile other = (AmFile)obj;
		return new EqualsBuilder()
			.append(getFileId(),other.getFileId())
			.isEquals();
	}
}

